$OpenBSD: patch-target_make,v 1.7 2013/09/08 16:28:02 sebastia Exp $

We do not want to use the -Wl,-soname, cruft to encode soname into the
library.

--- target.make.orig	Sat Mar 16 06:29:52 2013
+++ target.make	Tue Aug  6 09:37:16 2013
@@ -747,7 +747,7 @@ endif
 ifeq ($(findstring openbsd, $(GNUSTEP_TARGET_OS)), openbsd)
 HAVE_SHARED_LIBS        = yes
 SHARED_LIB_LINK_CMD = \
-	$(LD) -shared -Wl,-soname,$(LIB_LINK_SONAME_FILE) \
+	$(LD) -shared \
 	   $(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) $^ \
 	   $(INTERNAL_LIBRARIES_DEPEND_UPON) \
 	   $(SHARED_LD_POSTFLAGS) \
@@ -755,18 +755,17 @@ SHARED_LIB_LINK_CMD = \
 	  $(RM_LN_S) $(LIB_LINK_FILE); \
           if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
             $(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
-            $(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
-          fi; \
-	  $(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE))
+          fi;)
 AFTER_INSTALL_SHARED_LIB_CMD = \
 	(cd $(LIB_LINK_INSTALL_DIR); \
 	  $(RM_LN_S) $(LIB_LINK_FILE); \
           if [ "$(LIB_LINK_SONAME_FILE)" != "$(LIB_LINK_VERSION_FILE)" ]; then\
             $(RM_LN_S) $(LIB_LINK_SONAME_FILE);\
-            $(LN_S) $(LIB_LINK_VERSION_FILE) $(LIB_LINK_SONAME_FILE); \
           fi; \
-	  $(LN_S) $(LIB_LINK_SONAME_FILE) $(LIB_LINK_FILE); \
 	)
+AFTER_INSTALL_SHARED_LIB_CHOWN = \
+	(cd $(LIB_LINK_INSTALL_DIR); \
+	chown $(CHOWN_TO) $(LIB_LINK_SONAME_FILE))
 
 OBJ_MERGE_CMD		= \
 	$(LD) -nostdlib $(OBJ_MERGE_CMD_FLAG) $(ALL_LDFLAGS) -o $(GNUSTEP_OBJ_DIR)/$(SUBPROJECT_PRODUCT) $^ ;
